<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<head>
    <title><fmt:message key="folder" /></title>
</head>
<body>
    <h1><fmt:message key="folder" /></h1>
    <div class="buttons">
       <c:url var="createUrl" value="/domain/folder/createForm">
			<c:param name="folderId" value="${folder.inode}" />
	   </c:url>
       <a href="${createUrl}"><span><fmt:message key="label.link.create" />Folder</span></a>
       <c:url var="createFolderUrl" value="/domain/htmlPage/createForm">
			<c:param name="htmlPage.parentInode" value="${folder.inode}" />
	   </c:url>
       <a href="${createFolderUrl}"><span><fmt:message key="label.link.create" />HTML Page</span></a>
    </div>

    <table>
        <tbody>
           
			<tr>
                <th><fmt:message key="folder_siteInode" /></th>
                <td>
					<c:url var="showSiteUrl" value="/domain/site/show.action">
						<c:param name="site.inode" value="${folder.site.inode}" />
				    </c:url>
					<a href="${showSiteUrl}">
						<c:out value="${folder.site.name}"/>  
					</a>
				</td>
            </tr>
			<tr>
                <th><fmt:message key="folder_parentInode" /></th>
                <td>
					<c:if test="${not empty folder.parentNode.inode}">
				    <c:url var="showFolderUrl" value="/domain/folder/show.action">
						<c:param name="folder.inode" value="${folder.parentNode.inode}" />
				    </c:url>
					<a href="${showFolderUrl}">
                    <c:out value="${folder.parentNode.inode} - ${folder.parentNode.title}"/>  
					</a>
					</c:if>
				</td>
            </tr>
            <tr>
                <th><fmt:message key="folder_title" /></th>
                <td>
                    <c:out value="${folder.title}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="folder_friendlyName" /></th>
                <td>
                    <c:out value="${folder.friendlyName}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="folder_indexPath" /></th>
                <td>
                    <c:out value="${folder.indexPath}"/>                
				</td>
            </tr>

            <tr>
                <th><fmt:message key="folder_listPath" /></th>
                <td>
                    <c:out value="${folder.listPath}"/>                
				</td>
            </tr>

            <tr>
                <th><fmt:message key="folder_itemPath" /></th>
                <td>
                    <c:out value="${folder.itemPath}"/>                
				</td>
            </tr>

            <tr>
                <th><fmt:message key="folder_path" /></th>
                <td>
                    <c:out value="${folder.path}"/>                </td>
            </tr>
            <tr>
                <th><fmt:message key="folder_showOnMenu" /></th>
                <td>
                    <c:out value="${folder.showOnMenu}"/>                </td>
            </tr>
            <tr>
                <th><fmt:message key="folder_sortOrder" /></th>
                <td>
                    <c:out value="${folder.sortOrder}"/>                </td>
            </tr>
            <tr>
                <th><fmt:message key="folder_filesMasks" /></th>
                <td>
                    <c:out value="${folder.filesMasks}"/>                </td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2">
                    <div class="buttons">
                        <c:url var="updateUrl" value="/domain/folder/updateForm">
                            <c:param name="folder.inode" value="${folder.inode}"/>
                        </c:url>
                        <a href="${updateUrl}"><span><fmt:message key="label.link.update"/></span></a>
                        <c:url var="confirmDeleteUrl" value="/domain/folder/confirmDelete">
                            <c:param name="folder.inode" value="${folder.inode}"/>
                        </c:url>
                        <a id="confirmDeleteUrl" href="${confirmDeleteUrl}"><span><fmt:message key="label.link.delete"/></span></a>
                        <script type="text/javascript">
                            Spring.addDecoration(new Spring.AjaxEventDecoration({
                                elementId: "confirmDeleteUrl",
                                event: "onclick",
                                popup: "true",
                                params: { decorator: "none" }
                            }));
                        </script>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
    <h2><fmt:message key="label.related.content"/></h2>
</body>
